package org.casper.mbean;

public class ServerMonitor implements ServerMonitorMBean {
	private final ServerImpl target;

	public ServerMonitor(ServerImpl target) {
		this.target = target;
	}

	/**
	 * 获取系统的运行的时间
	 */
	@Override
	public long getUpTime() {
		return System.currentTimeMillis() - target.startTime;
	}

}
